package homework6.exp4;

import java.util.HashMap;

/**
 * @author fengq
 */
public class TestDom4jReadExample {
    public static void main(String[] args) {
        HashMap<String,String> hashMap;
        try {
            Dom4jReadExample dom4jReadExample=new Dom4jReadExample();
            hashMap=new HashMap<>();
            String property = System.getProperty("user.dir");
            System.out.println(property);
            dom4jReadExample.iterateWholeXML(property+"\\src\\studentInfo.xml",hashMap);
            for (int i=0;i<hashMap.size();i+=6){
                int j=i/6;
                System.out.print(hashMap.get("name"+j)+"\t");
                System.out.print(hashMap.get("student-age"+j)+"\t");
                System.out.print(hashMap.get("college"+j)+"\t");
                System.out.print(hashMap.get("college-leader"+j)+"\t");
                System.out.print(hashMap.get("telephone"+j)+"\t");
                System.out.println(hashMap.get("notes"+j)+"\t");
            }
        }catch (Exception e){
            e.printStackTrace();
        }

    }
            }
